/*
 * Picture.java
 *
 * Created on 7 październik 2007, 12:50
 *
 */

package kosciak.blip4j;

import java.net.URL;

/**
 * <CODE>Picture</CODE> object represents a picture in Blip.pl
 * Picture does not contain the picture itself!
 * @author Wojtek 'KosciaK' Pietrzok
 * @since 0.1
 */
public class Picture {
    
    private int id;
    private URL url;
    
    /**
     * Creates a new instance of Picture
     * @param id an Id of a Picture
     * @param url an URL of the Picture
     */
    protected Picture(int id, 
                      URL url) {
        
        this.id = id;
        this.url = url;
    }

    /**
     * Gets Picture's Id
     * @return an Id of a Picture
     */
    public int getId() {
        return id;
    }

    /**
     * Gets Picture's URL
     * @return an URL of the Picture
     */
    public URL getURL() {
        return url;
    }
    
    @Override
    public String toString() {
        return getURL().toString();
    }
    
}
